<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>魏远商城</title>
		<link rel="stylesheet" type="text/css" href="../../css/common/public.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/goods/orderDetalis.css"/>
	</head>

	<body>
		<!--顶部代码-->
		<div class="top_all">
			<div class="top">
				<div class="top_con">
					<div class="tlogin"></div>
					<div class="gotoregister" style="display: none;">免费注册</div>
					<div class="homepage">商城首页</div>
					<div class="tmyorder">我的订单<img src="../../image/turn_down.png"></div>						
					<div class="home_car"><img src="../../image/shop_car.png">购物车<span class="car_time">0</span></div>
					<div class="line_ke">联系客服<img src="../../image/turn_down.png"></div>							
				</div>			
			</div>
			<div class="loged" style="display: none;">
				<div><span class="guanli">账号管理</span>|<span class="out">退出</span></div>
				<div class="thead">
					<div class="thead_pic"><span></span></div>
					<div class="tmenber">企业会员</div>
				</div>
			</div>
			<div class="myorder">
				<span class="order_1">待支付</span>
				<span class="order_2">待发货</span>
				<span class="order_3">待收货</span>
				<span class="order_4">待评价</span>
			</div>
			<div class="tcont">
				<span class="mine1">用户帮助</span>
				<span class="mine2">联系客服</span>
				<span class="mine3">投诉建议</span>
				<span class="mine4">退换货</span>
				<span class="mine5">收货地址管理</span>
			</div>
		
		
		<div class="logeandsear">
			<div class="imageLogo"><img src="../../image/Logo.png"></div>
			<div class="search">
				<div>
					<img class="search-icon" src="../../image/search-icon.png"><input type="text" class="home_searchto" placeholder="魏远产品搜索" /><span class="gotosearch">搜索</span><span class="searchtips">X请输入您要搜索的内容</span>
				</div>
			</div>
	    </div>
	</div>	
	<div class="right">
		<div class="right_car"><span><img src="../../image/righr_car.png"></br>购</br>物</br>车</span></div>
		<div class="youhuiquan"><span>优</br>惠</br>券</span></div>
		<div class="qianbao"><span>钱</br>包</span></div>
		<div class="qiyeshangc"><span>企</br>业</br>商</br>城</span></div>
		<div class="totop"><span><br/>^<br/>TOP</span></div>
	</div>
	<div class="wrap">
	</div>
		<div class="main-log">
			<div>
				<!--配送-->
				<span>订单信息</span>
				<!--未配送-->
				<!--<span>收货人信息</span>-->
				<span class="main-per">
					<div class="orderDe">
						<div class="orderDe-t">
							<span class="orderDe-t1"></span>
							<span class="orderDe-t2"><span>订单号：</span><span class="orderDe-t22"></span></span>
							<span class="orderDe-t3"></span>
						</div>
						<div class="orderDe-m">
							<div class="orderDe-m-l">
								<div class="orderDe-m-l1">
									<span>收货地址：</span>
									<span><div class="namephone"><span class="name"></span><span class="phone"></span></div><div><span class="quyu"></span><br/><span class="address"></span></div></span>
								</div>
								<div class="orderDe-m-l2">
									<span>配送信息：</span>
									<span class="whkd"></span>
								</div>
							</div>
							<div class="orderDe-m-r">
								<div class="orderDe-m-l1">
									<span>买家留言：</span>
									<span class="buyerliuyan"></span>
								</div>
								<div class="orderDe-m-l2">
									<span>支付方式：</span>
									<span class="payway2"></span>
								</div>
							</div>
						</div>
					</div>
					<!--未配送-->
				</span>
			</div>
			<div>
				<span>商品信息</span>
				<span class="main-good">
					<div class="main-goods2">
						<span>商品名称</span>
						<span>类型</span>
						<span>单价（元）</span>
						<span>数量</span>
						<span>总价</span>
						<span>操作</span>
					</div>
                  
				</span>
			</div>
			<div class="main-js">
				<span style="font-size: 16px;color: #666;"><span>商品总金额：</span><span>￥<span class="moneyAll"></span></span></span>
				<span><span>优惠：</span><span>￥<span class="usecoun"></span></span></span>
				<span><span>运费：</span><span>￥<span class="useyun"></span></span></span>
				<span><span>实付金额：</span><span>￥<span class="newPrice"></span></span></span>
			</div>
			<div class="detailsD">
				<div class="main-dd2"></div>
				<div class=" main-dd1"></div>
			</div>
			
			<div class="main-error">收货人信息有误!</div>
		</div>
		
		
		
		<div class="mineback mbackkdiv" style="display:none;">
						<div class="mineback_con">
							<div class="mineback_title">
								<span class="mineback_titlez">申请退款</span><img class="mbackg" src="../../image/delect.png">
							</div>
							<div class="mineback_content">
								<span>退款说明：</span>
								<textarea class="mbackkt"></textarea>
								<span class="mineback_tips mbackkdivtips">退款说明不能为空</span>
								<div class="mineback_sub mbackkdivsub">提交退款申请</div>
							</div>
						</div>
					</div>
					
					
					<div class="mineloogwuliu" style="display: none;">
						 
						 <div class="logistics">
							<div class="log-top"><span>查看物流</span><span class="wuliucan"><img src="../../image/creat_cancel.png"/></span></div>
						 	<div class="log-main">
						 		<div class="log-main1">
						 			<p>运单编号：<span class="log-number"></span></p>
						 			<p>承运公司：<span class="log-complan"></span></p>
									<p>承运公司电话：<span class="log-phone"></span></p>
						 		</div>
						 		<div class="logMain1" style="color: #6F6F6F;padding: 20px;display: none;">
						 				暂时没有物流信息
						 		</div>
						 		<!--<div class="log-main2">-->
						 			<!--<div class="logMain">
						 				<div class="log-le yuandian"></div>
						 				<div class="log-ri">
						 					<p class="wuliuw">"[广东广州天河区东圃公司广氮中侨便民服务站]快件已被 已签收 签收"</p>
											<p class="wuliut">"2017-03-16 18:38:56"</p>
						 				</div>
						 			</div>
						 			<div class="logMain">
						 				<div class="log-le yuandian1"></div>
						 				<div class="log-ri">
						 					<p class="wuliuw">"[广东广州天河区东圃公司广氮中侨便民服务站]快件已被 已签收 签收"</p>
											<p class="wuliut">"2017-03-16 18:38:56"</p>
						 				</div>
						 			</div>
						 			<div class="logMain">
						 				<div class="log-le yuandian1"></div>
						 				<div class="log-ri">
						 					<p class="wuliuw">"[广东广州天河区东圃公司广氮中侨便民服务站]快件已被 已签收 签收"</p>
											<p class="wuliut">"2017-03-16 18:38:56"</p>
						 				</div>
						 			</div>-->
						 		<!--</div>-->
						 	</div>
						 </div>

					</div>
					
					<div class="minedorder alldiv" style="display:none;">
						<div class="minedorder_con">
							<div><span></span><span class="delete1-i"><img src="../../image/delect.png"/></span></div>
							<div><img src="../../image/cart-warn.png" />取消该订单？</div>
							<div><span class="delete1or-y">确定</span><span></span><span class="delete1or-n">取消</span></div>
						</div>
					</div>

					<div class="mineback mbackgdiv" style="display:none;">
						<div class="mineback_con">
							<div class="mineback_title">
								<span class="mineback_titlez">申请退货</span><img class="mbackg" src="../../image/delect.png">
							</div>
							<div class="mineback_content">
								<span>退货说明：</span>
								<textarea class="mbackgt"></textarea>
								<span class="mineback_tips mbackgdivtips">退货说明不能为空</span>
								<div class="mineback_sub mbackgdivsub">提交退货申请</div>
							</div>
						</div>
					</div>
					
					
					<div class="minetxfgoods alldiv" style="display:none;">
						<div class="minedorder_con">
							<div><span></span><span class="delete1-i"><img src="../../image/delect.png"/></span></div>
							<div><img src="../../image/cart-warn.png" />确认提醒发货？</div>
							<div><span class="txfgoods">确定</span><span></span><span class="delete1or-n">取消</span></div>
						</div>
					</div>
					

					<div class="minesureget alldiv" style="display:none;">
						<div class="minedorder_con">
							<div><span></span><span class="delete1-i"><img src="../../image/delect.png"/></span></div>
							<div><img src="../../image/cart-warn.png" />是否确认收货？</div>
							<div><span class="msureget">确定</span><span></span><span class="delete1or-n">取消</span></div>
						</div>
					</div>
					
					
					<div class="minedeleorder alldiv" style="display:none;">
						<div class="minedorder_con">
							<div><span></span><span class="delete1-i"><img src="../../image/delect.png"/></span></div>
							<div><img src="../../image/cart-warn.png" />删除该订单？</div>
							<div><span class="mdeleordersure">确定</span><span></span><span class="delete1or-n">取消</span></div>
						</div>
					</div>
		
		
		
		
		
		
		
		
		<!--组合商品-->
		<div class="comDe1" style="display: none;"></div>
		<div class="comDe" style="display: none;">
			<div class="comDe-t">组合商品 <img class="comDe-img" src="../../image/creat_cancel.png"/></div>
			<div class="comDe-m">
				
			</div>
		</div>
		<!--底部代码-->
	    <div>
			<div class="wrap_bottom"><img src="../../image/bottom.png"></div>
		</div>
	</body>
	<script src="../../assets/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/url.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">

		$('.downtypeg').css('height','700px');
		
		                 allpageinfo()
		             function allpageinfo(){
				
				
				
				$.ajax({
					url: ur + '/mobilemember/frontOrder/getOrderDetail',
					type: 'POST',
					dataType: 'json',
					headers: {
						"X-Token": localStorage.wyshoptoken
					},
					data: {
						"orderVO.id": localStorage.sureorderid
					},
					success: function(data) {
						
						console.log(JSON.stringify(data)+'详情');
						//						alert(data.obInfo.status);
						if(data.finalCode == 200) {
							
							if(data.obInfo.leaveWord!=""){
								
								$('.orderDe-m-l1').css('display','block');
								$('.buyerliuyan').text(data.obInfo.leaveWord);
							}
							
							
							$('.howtimes').text()
							$('.quyu').text(data.obInfo.area);
							$('.address').text(data.obInfo.detail);
							$('.name').text(data.obInfo.reciver);
							$('.phone').text(data.obInfo.phone);
							$('.orderDe-t22').text(data.obInfo.orderNum);
							$('.whkd').text(data.obInfo.expressName);
							$('.allcol').text(data.obInfo.productTotalPrice);
							$('.optai').attr('tai', data.obInfo.status);
							
							var time = data.obInfo.createTime;
							$('.orderDe-t1').text(time.replace('T', '  '));
							
							
//							$('.payway2').text(data.obInfo.typePay);
							if(data.obInfo.typePay == null) {
								$('.payway2').text("暂未支付");
							}else if(data.obInfo.typePay != null){
								$('.payway2').text(data.obInfo.typePay);
							}
							
							
							
							if(data.obInfo.freight == null) {
								$('.useyun').text(0);
							} else {
								$('.useyun').text(data.obInfo.freight);
							}
							if(data.obInfo.orderProductList.length > 0) {
								for(var i = 0; i < data.obInfo.orderProductList.length; i++) {
									var b = data.obInfo.orderProductList[i].skuProductVO.mainImg;
									console.log(b.indexOf(',') + '逗号索引值');
									var m = b.indexOf(',');
									if(m != '-1') {
										var mainImg = b.substring(0, m);
									} else {
										mainImg = b;
									}

									//								 var divd = $('<div class="top">'+
									//									'<div style="background-image: url('+picur+data.obInfo.orderProductList[i].skuProductVO.mainImg+');background-position: center;background-repeat: no-repeat;background-size: cover;"></div>'+
									//									'<div class="top_2">'+
									//										'<p><span>'+data.obInfo.orderProductList[i].skuProductVO.longname+'</span><span>￥'+data.obInfo.orderProductList[i].skuProductVO.newPrice+'</span></p>'+
									//										'<p><span>数量：<span class="dhowjian">'+data.obInfo.orderProductList[i].amount+'</span></span><span class="col refund" id="'+data.obInfo.orderProductList[i].productSkuId+'">退换货</span></p>'+
									//									'</div>'+
									//								    '</div>');
//									var divd = $('<div class="top">' +
//										'<div style="background-image: url(' + picur + mainImg + ');background-position: center;background-repeat: no-repeat;background-size: cover;"></div>' +
//										'<div class="top_wa">' +
//										'<div class="top_name"><span>' + data.obInfo.orderProductList[i].skuProductVO.longname + '</span><span>￥<span>' + data.obInfo.orderProductList[i].price + '</span></span></div>' +
//										'<div class="size"><span>' + data.obInfo.orderProductList[i].size + '</span></div>'+
//										'<div class="top_wa2">' +
//										'<div class="size">数量：<span class="dhowjian">' + data.obInfo.orderProductList[i].amount + '</span></div>' +
//										'<div class="top_2_z' + i + ' top_2_z">' +
//										//								'<span class="col refund" id="'+data.obInfo.orderProductList[i].productSkuId+'"></span>'+							
//										'</div>' +
//										'</div>' +
//
//										'</div>' +
//										'</div>');
                                    
                                    var divd = $('<div class="main-goods">'+
													'<div style="background-image: url(' + picur + mainImg + ');"></div>'+
													'<div class="main-goods1">'+
														'<div></div>'+
														'<div>'+
															'<span>'+
																'<span>' + data.obInfo.orderProductList[i].skuProductVO.longname + '</span>'+
//																'<span class="lookzuhedetails" style="display: none;">查看详情</span>'+
															'</span>'+
															'<span>' + data.obInfo.orderProductList[i].size + '</span>'+
															'<span>￥<span>' + data.obInfo.orderProductList[i].price + '</span></span>'+
															'<span class="howjian">' + data.obInfo.orderProductList[i].amount + '</span>'+
															'<span>￥<span>' + data.obInfo.orderProductList[i].price*data.obInfo.orderProductList[i].amount + '</span></span>'+
															'<span class="top_2_z' + i + '"></span>'+
														'</div>'+
													'</div>'+
												'</div>');
                                    localStorage.wyshopwheredetails=data.obInfo.orderProductList[i].skuProductVO.productId;
//                                  alert(localStorage.wyshopwheredetails)
                                    
                                    
                                    
									$('.main-good').append(divd);

									if(data.obInfo.orderProductList[i].comSkuIds != "null") {
										
										var evalu = $('<span class="col lookdeta" id="' + data.obInfo.orderProductList[i].comSkuIds + '">查看详情</span>');

										$('.top_2_z' + i + '').append(evalu);
									}

									var allprice = data.obInfo.productTotalPrice+data.obInfo.freight;
									$('.moneyAll').text(data.obInfo.productTotalPrice);
									$('.newPrice').text(data.obInfo.orderPay);
									
									if(data.obInfo.status == 1) {
										$('.orderDe-t3').text('待付款');
										$('.main-dd1').text('立即支付');
										//									$('.top_2_z').css('display','none');
										$('.main-dd2').text('取消订单');
									} else if(data.obInfo.status == 2||data.obInfo.status == 19) {
										//								var evalu = $('<span class="col refundmon" id="'+data.obInfo.orderProductList[i].productSkuId+'">退款</span>');
										//								    $('.top_2_z'+i+'').append(evalu);
										$('.orderDe-t3').text('待发货');
										$('.main-dd1').text('提醒发货');
										$('.main-dd2').text('申请退款');
										//									$('.top_2_z').css('display','none');
									} else if(data.obInfo.status == 3) {
										$('.main-dd2').text('查看物流');
										$('.orderDe-t3').text('待收货');
										$('.main-dd1').text('确认收货');
										//									$('.top_2_z').css('display','none');
									} else if(data.obInfo.status == 5) {
										$('.orderDe-t3').text('待评价');
										var evalu = $('<span class="col refund" id="' + data.obInfo.orderProductList[i].productSkuId + '">退货</span><br/>' +
											'<span class="col evaluate" id="' + data.obInfo.orderProductList[i].productSkuId + '">去评论</span>');
										$('.top_2_z' + i + '').append(evalu);
										$('.backor').text('删除订单');
										$('.main-dd2').css('display', 'none');
										$('.main-dd1').css('display', 'none');
									} else if(data.obInfo.status == 9) {
										var evalu = $('<span class="col refund" id="' + data.obInfo.orderProductList[i].productSkuId + '">退货</span><br/>' +
											'<span class="col evaluate1" id="' + data.obInfo.orderProductList[i].productSkuId + '">追加评论</span>');
										$('.top_2_z' + i + '').append(evalu);
										$('.backor').text('删除订单');
										$('.main-dd2').css('display', 'none');
										$('.main-dd1').css('display', 'none');
									}else if(data.obInfo.status == 11){
										$('.main-dd2').css('display', 'none');
										$('.main-dd1').css('display', 'none');
									}

								}
								
								 if(allprice!=data.obInfo.orderPay){
										$('.usecoun').text(allprice-data.obInfo.orderPay);
								}else if(allprice==data.obInfo.orderPay){
                                         $('.usecoun').text(0);
								}
							}
						}
					},
								error:(function(data){
//									plus.nativeUI.closeWaiting();
								})
				})
			}    
			
			
				function lookzdeta() {

				$.ajax({
					type: "post",
					url: ur + '/mobilemember/frontOrder/showComProductList',
					dataType: 'json',
					headers: {
						"X-Token": localStorage.token
					},
					data: {
						"comSkuIds": localStorage.zhsdeta
					},
					success: function(data) {
//                      plus.nativeUI.closeWaiting();
						if(data.result.meta.code == 200) {
							$('.black-all').css('display', 'block');
							for(var i = 0; i < data.result.data.length; i++) {
								var b = data.result.data[i].mainImg;
								console.log(b.indexOf(',') + '逗号索引值');
								var m = b.indexOf(',');
								if(m != '-1') {
									var mainImg = b.substring(0, m);
								} else {
									mainImg = b;
								}
//								var divd = $('<div class="top">' +
//									'<div style="background-image: url(' + picur + mainImg + ');background-position: center;background-repeat: no-repeat;background-size: cover;"></div>' +
//									'<div class="top_wa">' +
//									'<div class="top_name"><span>' + data.result.data[i].productVO.shortname + '</span><span>￥<span>' + data.result.data[i].newPrice + '</span></span></div>' +
//									'<div class="ztop_wa2">' +
//									'<div><span class="dhowjian">' + data.result.data[i].skuSize + '</span></div>' +
//
//									'</div>' +
//
//									'</div>' +
//									'</div>');


                                var divd = $('<div class="comDe-ord">'+
													'<span style="background-image:url(' + picur + mainImg + ');" class="comDe-ord1"></span>'+
													'<span class="comDe-ord2">'+
														'<span class="comDe-ord21">' + data.result.data[i].productVO.shortname + '</span>'+
														'<span class="comDe-ord22">'+
															'<span>' + data.result.data[i].skuSize + '</span>'+
															
														'</span>'+
													'</span>'+
													'<span class="comDe-ord3">￥<span>' + data.result.data[i].newPrice + '</span></span>'+
												'</div>')

                                

								$('.comDe-m').append(divd);
							}
						}
					},
					error: function(data) {
//                     plus.nativeUI.closeWaiting();
					}
				});
			}
			
			
			
			
		              
		    //查看组合商品详情
		    $('.main-good').on('click','.lookdeta',function(){
		    	
		    			$('.comDe1').css('display','block');
		                $('.comDe').css('display','block');
		    	
		    })
		    
		        
		    
		    $('.comDe-img ').on('click',function(){
		    	lookzdeta();
		    			$('.comDe1').css('display','none');
		                $('.comDe').css('display','none');
		    	
		    })          
		              
		              
		              /*去评论代码*/
		    $('.main-good').on('click', '.evaluate', function() {
//		    	 alert(localStorage.wyshopwheredetails)
				localStorage.wyshopsureorderid = localStorage.sureorderid;
				localStorage.wyshopspskuid = $(this).attr('id');
				localStorage.wyshopifevalute = 1;
				window.location.href='../goods/detalis.html';
			});
		     $('.main-good').on('click', '.evaluate1', function() {
//		    	 alert(localStorage.wyshopwheredetails)
				localStorage.wyshopsureorderid = localStorage.sureorderid;
				localStorage.wyshopspskuid = $(this).attr('id');
				localStorage.wyshopifevalute = 0;
				window.location.href='../goods/detalis.html';
			});        
		             
		             
		             /*退货代码*/
		    $('.main-good').on('click', '.refund', function() {
				
				localStorage.reskuid = $(this).attr('id');
				localStorage.backhow = $(this).parents('.main-goods').find('.howjian').text();

				$('.mbackgdiv').css('display','block');
				
			});
		     
		     $('.mbackgdivsub').on('click',function(){
		     	  if($('.mbackgt').val()==''){
					$('.mineback_tips').css('visibility','visible');
				}else{
					backgoods();
				}
		     });
		     
		     function backgoods(){
				 
					$.ajax({
						type:"post",
						url:ur+"/mobilemember/frontOrderOperation/returnReplacement",
						ddataType:'json',
						headers: {
								'X-Token': localStorage.wyshoptoken,
							},
						data: {
								'OrderVO.id': localStorage.sureorderid,
								'refundGoodsproductVO.amount':localStorage.backhow,
								'refundGoodsproductVO.productSkuId':localStorage.reskuid,
								'remark':$('.mbackgt').val(),
								'type':13
									//								'status':status
							},
						success:function(data){
							if(data.result.meta.code==200){
								$('.mbackgdiv').css('display','none');
							}else if(data.result.meta.code==202){
								
							}
							console.log(data);
						},
						error:function(data){
							console.log(data);
						}
					});
					
				}
		              
		              
		     /*点击取消代码*/       
		     
		    $('.wuliucan').on('click',function(){
				$(this).parents('.mineloogwuliu').css('display','none');
			}) 
		     
		    $('.delete1-i').on('click',function(){
				$(this).parents('.alldiv').css('display','none');
			}) 
		     
		    $('.delete1or-n, .delete1-n').on('click',function(){
				$(this).parents('.alldiv').css('display','none');
			})        
		              
		    $('.mbackg').on('click',function(){
			    	$(this).parents('.mineback').css('display','none');
			})
          
		    $('.delete1-i, .delete1or-n').on('click',function(){
				$(this).parents('.ifdeleorder').css('display','none');
			});
			
			
		    
		    
		    /*下面按钮点击的操作*/
		    $('.detailsD').on('click','.main-dd1',function(){
				
				if($(this).text()=='立即支付'){
					window.location.href='../cart/pay.html';
				}else if($(this).text()=='提醒发货'){
					$('.minetxfgoods').show(0);

				}else if($(this).text()=='确认收货'){
					$('.minesureget').show(0);
					
					
				}
			});
			
			
			
			$('.detailsD').on('click','.main-dd2',function(){
				
				if($(this).text()=='取消订单'){
					$('.minedorder').show(0);
					
				}else if($(this).text()=='申请退款'){
					$('.mbackkdiv').show(0);
					
					
				}else if($(this).text()=='查看物流'){
					$('.mineloogwuliu').show(0);
					lookwuliu();
				}else if($(this).text()=='删除订单'){
					$('.minedeleorder').show(0);
					
				}
			});
		    
		    
		    /*提交退款申请*/
		    $('.mbackkdivsub').on('click',function(){
						if($('.mbackkt').val()==''){
						$('.mbackkdivtips').css('visibility','visible');
					    }else{
					      	backkorder();
					    }
			});
		       //申请退款
			function backkorder(){
				$.ajax({
					type:"post",
					url:ur+"/mobilemember/frontOrderOperation/refundAmount",
					ddataType:'json',
					headers: {
							'X-Token': localStorage.wyshoptoken,
						},
					data: {
							'orderVO.id': localStorage.sureorderid,
							'remark':$('.mbackkt').val()
						},
					success:function(data){
						console.log(data);
						if(data.result.meta.code==200){
							$('.mbackkdiv').css('display','none');
						}else if(data.result.meta.code==202){
							
						}					
					},
					error:function(data){
						console.log(data);
					}
			});
			}
		    
		    
		    
		    
		    /*提交发货提醒*/
		    $('.txfgoods').on('click',function(){
					txordergoods();
				});
			
		    function txordergoods(){
//				alert(11);
				$.ajax({
						url: ur + '/mobilemember/frontOrderOperation/remind',
						type: 'post',
						headers: {
							"X-Token": localStorage.wyshoptoken
						},
						dataType: 'json',
						data: {
							"orderByRemindId": localStorage.sureorderid,
							
						},
						success: function(data) {
							console.log(data);
                          if(data.result.meta.code==200){
                          	$('.minetxfgoods').css('display','none');
                          }
							
							
						},
						error: function(data) {
							console.log(data);
						}
					})
			}
		
		
		   /*点击取消订单*/
		     $('.delete1or-y').on('click',function(){
					deleteorder();
			});
		       //取消订单
			function deleteorder(){
				$.ajax({
					url: ur + '/mobilemember/frontOrderOperation/cancel',
					type: 'post',
					headers: {
						"X-Token": localStorage.wyshoptoken
					},
					dataType: 'json',
					data: {
						"orderVO.id": localStorage.sureorderid,
						/*"id": '40288051594f367a015963128b240033',*/
					},
					success: function(data) {
                          if(data.result.meta.code==200){
                          	$('.minedorder').css('display','none');
                          }
                          
					},
					error: function(data) {

						console.log(data);
					}
				})
			}
			
			
			/*确认收货*/
			
			$('.msureget').on('click',function(){
					suregetgoods();
				});
			//确认收货
			function suregetgoods(){
				 
				 $.ajax({
						url: ur + '/mobilemember/frontOrderOperation/confirmReceipt',
						type: 'post',
						headers: {
							"X-Token": localStorage.wyshoptoken
						},
						dataType: 'json',
						data: {
							"orderVO.id": localStorage.sureorderid,
							/*"id": '40288051594f367a015963128b240033',*/
						},
						success: function(data) {
							console.log(data);
							
							//							all.fadeOut(1000);
							if(data.result.meta.code==200){
                          	$('.minesureget').css('display','none');
                          }
						},
						error: function(data) {
							console.log(data);
						}
					})
			}
			
			
		   
		   
		   //查看物流
			function lookwuliu(){
				$.ajax({
					url: ur + '/mobilemember/frontOrder/getOrderShipInfo',
					type: 'POST',
					headers: {
						"X-Token": localStorage.wyshoptoken
					},
					dataType: 'json',
					data: {
						"orderVO.id":localStorage.sureorderid
//						"orderVO.id": "644",
					},
					success: function(data) {
						alert(data.result.meta.code)
						if(data.result.meta.code == 201) {
							$('.logMain1').css('display', 'block');
						} else if(data.result.meta.code == 200) {
							$('.log-number').text(data.result.data.showapi_res_body.mailNo);
							$('.log-complan').text(data.result.data.showapi_res_body.expTextName);
							$('.log-phone').text(data.result.data.showapi_res_body.tel);
							var le = data.result.data.showapi_res_body.data;
							for(var i = 0; i < data.result.data.showapi_res_body.data.length; i++) {
								var context = replaceAll(JSON.stringify(data.result.data.showapi_res_body.data[i].context), '"', '');
									var divP = $('<div class="logMain" >'+
						 				'<div class="log-le yuandian1" id="log'+i+'"></div>'+
						 				'<div class="log-ri" style="width: 500px;">'+
						 					'<p class="wuliuw">'+context+'</p>'+
											'<p class="wuliut">'+JSON.stringify(data.result.data.showapi_res_body.data[i].time)+'</p>'+
						 				'</div>'+
						 			'</div>');
									$('.log-main').append(divP);
									$('.wuliuw').css('color','#151515');
									if(i==0){
										$('#log'+i).removeClass('yuandian1');
										$('#log'+i).addClass('yuandian');
									}else if (i == data.result.data.showapi_res_body.data.length-1){
										$('#log'+i).parent().css('border','none')
									}
							}
						}
					},
					error: function(data) {
						console.log(data);
					}
				})
			}
		
		
		
		
		
	var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;   //height
    var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;      //width
		
	$('.mineloogwuliu').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed",});
    $('.minetxfgoods').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
    $('.minedeleorder').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
    $('.minesureget').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
    $('.editor_address_d').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
    $('.minedorder').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
    $('.mineback').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
    $('.ifdeleorder').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
    $('.mine_complainsuccess').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
	$('.creat_address_d').css({'width':w,"height":h,"top":"0","left":"0","position":"fixed"});
		
		
		
		
	</script>
</html>